package com.central.apps.entity;


import com.central.apps.dto.EditorConfigDTO;
import com.central.apps.dto.PermissionDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * onlyoffice定义的文档对象
 *
 * @author JHY
 */
@ApiModel("文档实体")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Document implements Serializable {
    /**
     * 【必需】文件唯一标识
     */
    @ApiModelProperty(value = "文档 key", example = "xYz123")
    private String key;
    /**
     * 【必需】文档名称
     */
    @ApiModelProperty(value = "文档标题", example = "test.doc")
    private String title;
    /**
     * 【必需】文档后缀
     */
    @ApiModelProperty(value = "文档类型", example = "doc")
    private String fileType;
    /**
     * 文件实体在服务器硬盘存储位置
     */
    @ApiModelProperty(value = "文档物理存储位置", example = "/temp/test.doc")
    private String storage;
    /**
     * 【必需】文件实体下载地址
     */
    @ApiModelProperty(value = "文档获取url", example = "http://192.168.0.58:20053/api/file/xYz123")
    private String url;
    @ApiModelProperty(value = "令牌", example = "4708947e-7dbe-41a4-8691-c33594c41c62")
    private String token;
    @ApiModelProperty(value = "类型", example = "desktop")
    private String type;
    @ApiModelProperty(value = "宽度", example = "100%")
    private String width;
    @ApiModelProperty(value = "高度", example = "100%")
    private String height;
    @ApiModelProperty(value = "文档类型", example = "word")
    private String documentType;


    /**
     * 编辑器配置
     */
    private EditorConfigDTO editorConfig;

    /**
     * 文档权限
     */
    private PermissionDTO permissions;

}
